package test;

import java.io.IOException;

import org.apache.lucene.index.IndexReader;
import org.apache.lucene.search.Query;
import org.apache.lucene.search.function.CustomScoreProvider;
import org.apache.lucene.search.function.CustomScoreQuery;

@SuppressWarnings("serial")
public class RecCustomScoreQuery extends CustomScoreQuery {
	
	private float ALPHA;
	private float cenx;
	private float ceny;
	private float lenx;
	private float leny;

	public RecCustomScoreQuery(Query subQuery, float ALPHA, float cenx, float ceny, float lenx, float leny) {
		super(subQuery);
		// TODO Auto-generated constructor stub
		this.ALPHA = ALPHA;
		this.cenx = cenx;
		this.ceny = ceny;
		this.lenx = lenx;
		this.leny = leny;
	}

	@Override
	protected CustomScoreProvider getCustomScoreProvider(IndexReader reader)
			throws IOException {
		return new RecCustomScoreProvider(reader, ALPHA, cenx, ceny, lenx, leny);
	}
}
